package M;

public class Test {
    public static void main(String[] args) {
        Myduilie myduilie =new Myduilie();
        myduilie.offer(1);
        myduilie.offer(2);
        myduilie.offer(3);
        myduilie.offer(4);
        int val=myduilie.poll();
        int val1=myduilie.poll();
        int val2=myduilie.poll();
        int val4=myduilie.peek();
        System.out.println(val4);
        int val3=myduilie.poll();
        System.out.println(val+val2+val3+val1);

    }
}
